<template>
  <div class="bg_white" style="height: calc(100vh - 198px);">
<img src="@/assets/img/stu.png" alt="" style="height: 100px;">
<div style="margin-top: 10px;">前往开通新生入学功能，收集学生信息进入档案</div>
<a-button type="primary" style="margin-top: 10px;" @click="togokaitong">
      去开通
    </a-button>
</div>
</template>

<script>
export default {
data(){
  return{
    list:[
      {
        title:"第一步",
        content:""
      }
    ]
  }
},
methods:{
  togokaitong(){
    this.$router.push({path:"enrollmentNewStu"})
  }
}
}
</script>

<style lang="less" scoped>
// .main{
//   text-align: center;
//   justify-content: center;
//   align-items: center;
// }
.bg_white {
  text-align: center;
  min-height: 300px;
  img {
    display: block;
    margin: 12px auto;
  }
}
</style>
<!-- <template>
  <div class="page-header-index-wide" style="max-width: 400px;">
    <a-card :bordered="false">
      <a-button type="primary"  size="small">添加顶级菜单</a-button>
      <a-tree
        :treeData="treeData"
        show-icon
      >
        <template slot="custom" slot-scope="item">
          <a-icon slot="smile" type="folder" />
          <span>{{ item.title }}</span>
          <a-button
            type="primary"
            class="but_type"
            size="small"
            style="right:120px;"
            @click="()=> append(item)"
          >新增</a-button>
          <a-button
            type="primary"
            class="but_type"
            size="small"
            style="right:70px;"
            @click="()=> edit(item)"
          >编辑</a-button>
          <a-button type="primary" class="but_type"  size="small" @click="(e)=> remove(item)">删除</a-button>
        </template>
      </a-tree>
    </a-card>
  </div>
</template>

<script>
const treeData = [
  {
    title: '0-0',
    key: '0-0',
    scopedSlots: { title: 'custom' },
    children: [
      {
        title: '0-0-0',
        key: '0-0-0',
        scopedSlots: { title: 'custom' },
        children: [
          { title: '0-0-0-0', key: '0-0-0-0', scopedSlots: { title: 'custom' } },
          { title: '0-0-0-1', key: '0-0-0-1', scopedSlots: { title: 'custom' } },
          { title: '0-0-0-2', key: '0-0-0-2', scopedSlots: { title: 'custom' } }
        ]
      },
      {
        title: '0-0-1',
        key: '0-0-1',
        scopedSlots: { title: 'custom' },
        children: [
          { title: '0-0-1-0', key: '0-0-1-0', scopedSlots: { title: 'custom' } },
          { title: '0-0-1-1', key: '0-0-1-1', scopedSlots: { title: 'custom' } },
          { title: '0-0-1-2', key: '0-0-1-2', scopedSlots: { title: 'custom' } }
        ]
      },
      {
        title: '0-0-2',
        key: '0-0-2',
        scopedSlots: { title: 'custom' }
      }
    ]
  },
  {
    title: '0-1',
    key: '0-1',
    scopedSlots: { title: 'custom' },
    children: [
      { title: '0-1-0-0', key: '0-1-0-0', scopedSlots: { title: 'custom' } },
      { title: '0-1-0-1', key: '0-1-0-1', scopedSlots: { title: 'custom' } },
      { title: '0-1-0-2', key: '0-1-0-2', scopedSlots: { title: 'custom' } }
    ]
  },
  {
    title: '0-2',
    key: '0-2',
    scopedSlots: { title: 'custom' }
  }
]

export default {
  data () {
    return {
      treeData,
    }
  },
  methods: {
    // 递归查找
    searchOption (option, arr, type = 'delect') {
      console.log(option, arr)
      for (let s = 0; s < arr.length; s++) {
        console.log(arr[s].key, option.key)
        if (arr[s].key === option.key) {
          if (type === 'delect') {
            arr.splice(s, 1)
          } else {
          //这是模拟数据编辑数据
            this.$set(arr, s, {
              title: '12121212',
              key: '12121212',
              scopedSlots: { title: 'custom' }
            })
          }
          break
        } else if (arr[s].children && arr[s].children.length > 0) { // 递归条件
          this.searchOption(option, arr[s].children)
        } else {
          continue
        }
      }
    },
    append (data) {
    //模拟添加
      const newChild = { title: 'ceshi1',
        key: 'ceshi1',
        scopedSlots: { title: 'custom' },
        children: [] }
      if (!data.children) {
        this.$set(data, 'children', [])
      }
      data.children.push(newChild)
    },
    remove (data) {
        //先请求后端接口，删除成功后执行
      this.searchOption(data, this.treeData)
    },
    edit (data) {
        //先请求后端接口，编辑成功后执行
      this.searchOption(data, this.treeData, 'edit')
    },
  }
}
</script>
<style lang="less">
.ant-tree-title {
  width: 100%;
}
.title {
  float: left;
}
.ant-tree li{
  padding: 5px 0 !important;
}
.ant-tree li ul {
  padding:5px 0 0 18px !important;
}
.ant-card-body {
  :global {
    .ant-tree {
      line-height: 1;
      li {
        position: relative;
      }
    }
  }
}
.ant-card-body .but_type {
  float: right;
  position: absolute;
  right: 20px;
}
</style> -->

